﻿<%@page import="org.apache.xmlbeans.impl.xb.xsdschema.IncludeDocument.Include"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量    
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。    
	pageContext.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="baidu-site-verification" content="tTsL87cTjw" />
<meta name="360-site-verification"
	content="de9a8cf85e91526bb0fd85cc0b79d91d" />
<meta name="sogou_site_verification" content="vrYH8HBStA" />
<title>安阳师范网购系统！</title>
<link type="text/css" href="<%=basePath%>/mallstyle/css/header.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/home.css"
	rel="stylesheet" />
<link type="text/css"
	href="<%=basePath%>/mallstyle/css/idangerous.swiper.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/footer.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/qq.css"
	rel="stylesheet" />
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/index.js"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/jquery.js" charset="utf-8"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/cart.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/main.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/qq.js"
	charset="utf-8"></script>

<!--[if lte IE 6]>
<script type="text/javascript" language="Javascript" src="<%=basePath%>/mallstyle/js/hoverforie6.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript"
	src="<%=basePath%>/mallstyle/js/swiper.min.js"></script>
<!--<editmode></editmode>-->

</head>

<body>
    <%@include file="../nav.jsp"%>
	<div class="mbox" widget_type="area" area="main_level_top">

		<div id="_widget_301" name="taocz_image_ads" widget_type="widget"
			class="widget">
			<div class="image_ads mb10" style="margin: 0px 0px 0px 0px">
				<a href="#"
					target="_blank"><img width="1200px" height="100px"
					src="<%=basePath%>/mallstyle/picture/201703131147003646.jpg" /></a>
			</div>

		</div>
	</div>
<%@include file="../header.jsp" %>

	<div class="mbox">
		<ul class="mnav">
			<li class="all-item"><a href="#">全部商品分类</a>
				<ul class="catalog" id="categoryOne">
					<!-- 	<c:forEach items="${parents }" var="parent">
						<li>
							<a href="index.php?app=search&amp;cate_id=2002" class="clearfix">
								<div class="square"></div>
								<div class="catalog-name">${parent.catName }</div>
								<div class="mright-arrow"></div>
							</a>
						</li> 
					</c:forEach>-->
				</ul></li>
			<li class="active"><a href="#">首页</a></li>
			<li class=""><a href="#">安阳商城</a></li>
			<li class=""><a href="#">联盟商家</a></li>
			<li class=""><a href="#">在线充值</a></li>
			<li class=""><a href="#">话费充值</a></li>
			<li class=""><a href="#">资讯中心</a></li>
			<li class=""><a href="#">现金专区</a></li>
		</ul>
	</div>
	<script>
			function refreshGoods(listtype) {
			}
		</script>

	<div class="swiper-box">
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<div class="swiper-slide">
					<a href="#"
						class="swiper-slide-inner" > <img
						src="<%=basePath%>/mallstyle/picture/201703131146074718.jpg" />
					</a>
				</div>
				<div class="swiper-slide">
					<a href="#"
						class="swiper-slide-inner" > <img
						src="<%=basePath%>/mallstyle/picture/201703131115495456.jpg" />
					</a>
				</div>
				<div class="swiper-slide">
					<a
						href="#"
						class="swiper-slide-inner" > <img
						src="<%=basePath%>/mallstyle/picture/201703131122159870.jpg" />
					</a>
				</div>
				<div class="swiper-slide">
					<a
						href="#"
						class="swiper-slide-inner" > <img
						src="<%=basePath%>/mallstyle/picture/201703131123421680.jpg" />
					</a>
				</div>
				<div class="swiper-slide">
					<a href="#"
						class="swiper-slide-inner" > <img
						src="<%=basePath%>/mallstyle/picture/201703131124085650.jpg" />
					</a>
				</div>
				<div class="swiper-slide">
					<a href="#"
						class="swiper-slide-inner" > <img
						src="<%=basePath%>/mallstyle/picture/201703131125025980.jpg" />
					</a>
				</div>
			</div>
			<div class="pagination"></div>
		</div>
		<c:if test="${empty user }">
			<div class="right-side">
				<div class="rlogo">
					<img src="<%=basePath%>/mallstyle/picture/rlogo.png" />
				</div>
				<p>Hi~您好！</p>
				<div>
					<a href="<%=path%>/rest/user/loginJsp" class="red-middle-btn">请登录</a>
				</div>

				<p>
					<a href="<%=path%>/rest/user/registerJsp"> <span>免费注册</span> <span
						class="mright-arrow-little"></span>
					</a>
				</p>

				<div class="divider"></div>
				<ul class="personal">
					<li><a href="<%=path%>/rest/user/loginJsp" class="clearfix">
							<span class="icon-morder"></span> <span class="mgr5">我的订单</span>
							<span class="mright-arrow-little mgt8"></span>
					</a></li>
					<li><a href="<%=path%>/rest/user/loginJsp" class="clearfix">
							<span class="icon-madvisory"></span> <span class="mgr5">我的信息</span>
							<span class="mright-arrow-little mgt8"></span>
					</a></li>
				</ul>

			</div>
		</c:if>
		<c:if test="${not empty user }">
		<div class="right-side">
				<div class="rlogo">
					<img src="<%=basePath%>/mallstyle/picture/rlogo.png" />
				</div>
				<p>Hi~${user.uName }您好！</p>
				<div class="divider"></div>
				<ul class="personal">
					<li><a href="<%=path%>/rest/orderform/myOrder" class="clearfix">
							<span class="icon-morder"></span> <span class="mgr5">我的订单</span>
							<span class="mright-arrow-little mgt8"></span>
					</a></li>
					<li><a href="<%=path%>/rest/user/myInfo" class="clearfix">
							<span class="icon-madvisory"></span> <span class="mgr5">我的信息</span>
							<span class="mright-arrow-little mgt8"></span>
					</a></li>
				</ul>

			</div>
		</c:if>

	</div>

	<div class="mbox mgt20">
		<div class="clearfix item-title">
			<div class="pull-left">
				<span>商城</span> <span class="circle"></span> <span>新品</span>
			</div>
			<div class="pull-right">
				<a href="javascript:refreshGoods('good');" class="gray-color"> <span>换一批</span>
					<span class="refresh"></span>
				</a>
			</div>
		</div>
		<div class="item-content">
			<ul class="new-product-list" id="good_goods_list">
				<!--  			<li>
						<a href="index.php?app=goods&amp;id=3385">
							<div class="img-pic">
								<img src="<%=basePath%>/mallstyle/picture/small_201609231102164439.jpg" />
							</div>
							<div class="pintro">
								<p class="product-name">playboy 男士短袖</p>

								<p class="price">&yen; <span>719</span></p>
							</div>
						</a>
					</li>-->
			</ul>
		</div>
	</div>

	<div class="mbox mgt20"></div>

	<script type="text/javascript">
			$(function() {
				//轮播图效果
				var mySwiper = $('.swiper-container').swiper({
					autoplay: 3000,
					loop: true,
					pagination: '.pagination',
					paginationClickable: true,
					autoplayDisableOnInteraction: false
				});

				//选项卡切换效果
				$('.ltab li').mouseover(function() {
					var tabParent;
					var tabContents;
					var $index = $(this).index();
					$(this).addClass('active');
					$(this).siblings().removeClass('active');
					tabParent = $(this).parents('.item-title');
					tabContents = $(tabParent).next('.item-content').find('.tab-wrap');
					$(tabContents).find('.ctab-content').eq($index).addClass('active');
					$(tabContents).find('.ctab-content').eq($index).siblings().removeClass('active');
				});
			})
		</script>
	<div class="clear"></div>

<%@include file="../bottom.jsp" %>
	
	<div class="keifu">
		<div class="keifu_tab">
			<div class="icon_keifu"></div>
			<div class="keifu_box">
				<div class="keifu_head">
					<a href="javascript:void(0)" class="keifu_close"></a>
				</div>
				<ul class="keifu_con">
					<li><a target="_blank"
						href="http://wpa.qq.com/msgrd?v=3&uin=1146683016&site=qq&menu=yes"
						title="客服一"><img src="<%=basePath%>/mallstyle/picture/qq.png"
							alt="客服一" /></a></li>
					<li><a target="_blank"
						href="http://wpa.qq.com/msgrd?v=3&uin=2924632517&site=qq&menu=yes"
						title="客服二"><img src="<%=basePath%>/mallstyle/picture/qq.png"
							alt="客服二" /></a></li>
					<li><a target="_blank"
						href="http://wpa.qq.com/msgrd?v=3&uin=2395736313&site=qq&menu=yes"
						title="客服三"><img src="<%=basePath%>/mallstyle/picture/qq.png"
							alt="客服三" /></a></li>
					<li><a target="_blank"
						href="http://wpa.qq.com/msgrd?v=3&uin=3025745623&site=qq&menu=yes"
						title="客服四"><img src="<%=basePath%>/mallstyle/picture/qq.png"
							alt="客服四" /></a></li>

					<li class="weixin"><img
						src="<%=basePath%>/mallstyle/picture/qrcode.jpg" width="96"
						alt="扫一扫，关注安阳师范公众号" /></li>
				</ul>
				<div class="keifu_bot"></div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			$.ajax({
	        	url:"<%=path%>/rest/category/getAllCategoryOne",
	        	contentType:"application/json;charset=UTF-8",
	        	dataType:"json",
	        	type:"post",  
	        	            	async:true,  
	        	           	 	success:function(result){
	        	           	 	$.each(result.json, function(i, item) {
	        						jQuery("#categoryOne").append(
	        								"<li ><a href='<%=path%>/rest/goods/getGoodsByCategory?catid="+item.catId+"' class='clearfix'><div class='square'></div><div class='catalog-name'>" + item.catName + "</div><div class='mright-arrow'></div></li>");
	        					});
	        	           	 	},
	        	           	 	error:function(result){
	        	           	 		alert("错误！");
	        	           	 	}
	        	});
		});
	</script>
	<script type="text/javascript">
		$(document).ready(function() {
			$.ajax({
	        	url:"<%=path%>/rest/goods/getGoodsList",
	        	contentType:"application/json;charset=UTF-8",
	        	dataType:"json",
	        	type:"post",  
	        	            	async:true,  
	        	           	 	success:function(result){
	        	           	 	$.each(result.json, function(i, item) {
	        						jQuery("#good_goods_list").append(
	        								"<li ><a href='<%=path%>/rest/goods/getGoodsById?gid="+item.gId+"'><div class='img-pic'><img src='<%=basePath%>/mallstyle/picture/small_201609231102164439.jpg' /></div><div class='pintro'><p class='product-name'>"+item.gName+"</p><p class='price'>&yen; <span>"+item.gPrice+"</span></p></div></li>");
	        					});
	        	           	 	},
	        	           	 	error:function(result){
	        	           	 		alert("错误！");
	        	           	 	}
	        	});
		});
	</script>
</body>


</html>